package com.buddy.jni.demo03;

public class JNIPrimitive {
    static {
        System.loadLibrary("jni_primitive");
    }

    // Declare a native method average() that receives two ints and return a double containing the average
    private native double average(int n1, int n2);

    public static void main(String args[]) {
        System.out.println("In Java, the average is " + new JNIPrimitive().average(3, 2));
    }

    //javac -h ./ JNIPrimitive.java 编译生成.h文件
}
